// --------------------------------------------------------------------------------------------------------------------
// <copyright file="LoggerEventArgs.cs" company="Open Trader">
//   Copyright (c) David Denis (david.denis@systemathics.com)
// </copyright>
// <summary>
//   |  Open Trader - The Open Source Systematic Trading Platform
//   |
//   |  This program is free software: you can redistribute it and/or modify
//   |  it under the terms of the GNU General Public License as published by
//   |  the Free Software Foundation, either version 2 of the License, or
//   |  (at your option) any later version.
//   |
//   |  This program is distributed in the hope that it will be useful,
//   |  but WITHOUT ANY WARRANTY; without even the implied warranty of
//   |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   |  GNU General Public License for more details.
//   |
//   |  You should have received a copy of the GNU General Public License
//   |  along with this program.  If not, see http://www.gnu.org/licenses
//   |
//   |  Up to date informations about Open Trader can be found at :
//   |    http://opentrader.org
//   |    http://opentrader.codeplex.com
//   |
//   |  For professional services, please visit us at :
//   |    http://www.systemathics.com
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Org.OpenTrader.Framework.Events
{
    #region Using Directives

    using System;

    #endregion

    /// <summary>
    /// The logger event args.
    /// </summary>
    [Serializable]
    public abstract class LoggerEventArgs : EventArgs
    {
        /// <summary>
        /// The logger size event args.
        /// </summary>
        [Serializable]
        public class SizeChanged : LoggerEventArgs
        {
            #region Constants and Fields

            /// <summary>
            /// The cols.
            /// </summary>
            private readonly int cols;

            /// <summary>
            /// The rows.
            /// </summary>
            private readonly int rows;

            #endregion

            #region Constructors and Destructors

            /// <summary>
            /// Initializes a new instance of the <see cref="SizeChanged"/> class. 
            /// Initializes a new instance of the <see cref="LoggerSizeEventArgs"/> class.
            /// </summary>
            /// <param name="rows">
            /// The rows.
            /// </param>
            /// <param name="cols">
            /// The cols.
            /// </param>
            public SizeChanged(int rows, int cols)
            {
                this.rows = rows;
                this.cols = cols;
            }

            #endregion

            #region Properties

            /// <summary>
            /// Gets Cols.
            /// </summary>
            public int Cols
            {
                get
                {
                    return this.cols;
                }
            }

            /// <summary>
            /// Gets Rows.
            /// </summary>
            public int Rows
            {
                get
                {
                    return this.rows;
                }
            }

            #endregion
        }

        /// <summary>
        /// The logger text event args.
        /// </summary>
        [Serializable]
        public class TextAvailable : LoggerEventArgs
        {
            #region Constants and Fields

            /// <summary>
            /// The text.
            /// </summary>
            private readonly string text;

            #endregion

            #region Constructors and Destructors

            /// <summary>
            /// Initializes a new instance of the <see cref="TextAvailable"/> class. 
            /// Initializes a new instance of the <see cref="LoggerTextEventArgs"/> class.
            /// </summary>
            /// <param name="text">
            /// The text.
            /// </param>
            public TextAvailable(string text)
            {
                this.text = text;
            }

            #endregion

            #region Properties

            /// <summary>
            /// Gets Text.
            /// </summary>
            public string Text
            {
                get
                {
                    return this.text;
                }
            }

            #endregion
        }
    }
}